<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="./css/message.css">
</head>
<body>
<div class="header">
    <div id="message" class="message">消息中心<span class="message-num"></span></div>
</div>
<div style="border:1px solid #b3c9e1;">
    数据结构
    <pre>
  "userId": String,
  "userName": String,
  "messages": [
    {
      "caseId": String,
      "caseName": String,
      "detail": String,
      "isRead": Boolean,
      "time": {type: Date, default: Date.now()}
    }
  ]
 </pre>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/template-web.js"></script>
<script src="js/message.js"></script>
<script>
  new Message('#message', {
    url: 'http://localhost:8080/user/getMessage', // 完整数据
    updateUrl: 'http://localhost:8080/user/update' // 修改消息已读/未读状态
  });
</script>
</body>
</html>